import { initMixin } from "./init";
import { stateMixin } from "./state";
import { renderMixin } from "./render";
import { eventsMixin } from "./events";
import { lifecycleMixin } from "./lifecycle";
import { warn } from "../util/index";

function Vue(options) {
  if (process.env.NODE_ENV !== "production" && !(this instanceof Vue)) {
    warn("Vue is a constructor and should be called with the `new` keyword");
  }
  this._init(options);
}
/* 对基础属性数据，属性代理 进行处理 */
/* 其中包含有两个生命周期 */
initMixin(Vue);
/* 新增了几个api $data $props $set $del $watch */
stateMixin(Vue);
/* 新增api $on $emit $once $off */
eventsMixin(Vue);
/* 三个api $destory $forceUpdate _update , 以及调用过后触发的两个生命周期，beforeDestory , destoryed */
lifecycleMixin(Vue);
/* 新增 $nextTick _render */
renderMixin(Vue);

export default Vue;
